package com.amit.spring.ioc;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Lab1 {

	
	public static void main(String[] args) {
		
		
		//without using ioc
		
//	A aobj=new A();
//	aobj.setA(12);
//	aobj.setMsg("Hello amit in class A");
//	
//	B bobj=	new B(23, "hello amit in class B");
//	
//	Hello hello=new Hello(bobj);
//	hello.setAobj(aobj);
//	hello.show();
//	
		
		ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
		
		Hello hello=(Hello) ctx.getBean("hello");
		hello.show();
	
	
	
		
	}

}
